#! /bin/sh -vx
# $Id$
# Copyright 2017 Karl Berry <tex-live@tug.org>
# Copyright 2009-2012 Peter Breitenlohner <tex-live@tug.org>
# You may freely use, modify and/or distribute this file.

BinDir=${BinDir:-.}
ExeExt=${ExeExt:-}
_dvitype=$BinDir/dvitype$ExeExt

test -d tests || mkdir -p tests

if tfmpath=`$KPSEWHICH cmbx10.tfm`; then

  TEXMFCNF=$srcdir/../kpathsea \
    TFMFONTS=`dirname "$tfmpath"` \
    $_dvitype -show-opcodes $srcdir/tests/story >tests/xstory.dvityp || exit 1

fi

TEXMFCNF=$srcdir/../kpathsea \
  TFMFONTS=$srcdir/tests \
  $_dvitype --p=\*.\*.2 $srcdir/tests/pagenum.dvi >tests/xpagenum.typ || exit 2

